core: Fix regression in previous commit
authorColin Walters <walters@verbum.org>
Fri, 12 Oct 2012 19:25:25 +0000 (15:25 -0400)
committerColin Walters <walters@verbum.org>
Fri, 12 Oct 2012 19:25:25 +0000 (15:25 -0400)
src/libotutil/ot-gio-utils.c

index 1e985162ace2d67db2e9655d6c9e51b92cca34a4..bf3743d32ab01847240f12b4a3e99b0a54486b50 100644 (file)
@@ -60,7 +60,10 @@ ot_gfile_ensure_directory (GFile     *dir,
   if (with_parents)
     {
       ot_lobj GFile *parent = g_file_get_parent (dir);
-      ret = ot_gfile_ensure_directory (parent, TRUE, &temp_error);
+      if (parent)
+        ret = ot_gfile_ensure_directory (parent, TRUE, &temp_error);
+      else
+        ret = TRUE;
     }
   else
     ret = g_file_make_directory (dir, NULL, &temp_error);